/*
 * @Author: 'yangyuhang1203' '2621131059@qq.com'
 * @Date: 2025-07-17 18:42:08
 * @LastEditors: 'yangyuhang1203' '2621131059@qq.com'
 * @LastEditTime: 2025-07-17 20:21:12
 * @FilePath: \Java04\Test01.java
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
public class Test01{
    public static void main(String[] args)
    {
        System.out.println("-----商场库存清单-----");
        System.out.println("品牌型号\t尺寸\t价格\t库存数");
        // 定义商品变量（表格内容）
        // 第一台电脑
        String brand1 = "MacBookAir";
        double size1 = 13.3;
        double price1 = 5699.0;
        int stock1 = 5;
        // 第二台电脑
        String brand2 = "ThinkPadT490";
        double size2 = 14.0;
        double price2 = 8499.0;
        int stock2 = 10;
        // 第三台电脑
        String brand3 = "MateBook 14";
        double size3 = 14.0;
        double price3 = 7199.0;
        int stock3 = 18;
        // 输出表格内容
        System.out.println(brand1 + "\t" + size1 + "\t" + price1 + "\t" + stock1);
        System.out.println(brand2 + "\t" + size2 + "\t" + price2 + "\t" + stock2);
        System.out.println(brand3 + "\t" + size3 + "\t" + price3 + "\t" + stock3);
        System.out.println("--------------------");
        // 计算总库存数和总金额（表尾）
        int Stock = stock1 + stock2 + stock3;
        double price = price1 * stock1 + price2 * stock2 + price3 * stock3;
        // 输出表尾
        System.out.println("总库存数:" + Stock);
        System.out.println("商品库存总金额:" + price);
    }
}